const routes = [
  {
    path: '/',
    component: () => import('src/layouts/MainLayout.vue'),
    redirect: '/home',
    children: [
      {
        path: '/edit',
        component: () => import('pages/WorkSpace.vue'),
        children: [
          {
            path: '/',
            redirect: 'default',
            component: () => import('pages/mxgraph/graphEditorCustom.vue')
          },
          {
            path: '*',
            component: () => import('pages/mxgraph/graphEditorCustom.vue')
          }
        ]
      },
      { path: '/home', component: () => import('components/Home/content.vue') },
      { path: '/test', component: () => import('pages/test.vue') }

    ]
  }
];

//// Always leave this as last one
if (process.env.MODE !== 'ssr') {
  //// TODO
  routes.push({
    path: '*',
    component: () => import('pages/Error404.vue')
  });
}

export default routes;
